package com.ruoyi.job.util;

public class GetOnlyId {

	public static String getOnlyId() {
		try {
			Thread.sleep(1);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		SnowflakeIdWorker SnowflakeIdWorker = new SnowflakeIdWorker(0,0);
		String onlyId = String.valueOf(SnowflakeIdWorker.nextId());
		return onlyId;
	}
	public static void main(String[] args) throws InterruptedException {
		for(int i = 0;i<=10;i++) {
			System.out.println(GetOnlyId.getOnlyId());
		}
//		for(int i = 0;i<=10;i++) {
//			System.out.println(GetOnlyId.getOnlyId());
//			Thread.sleep(1);
//		}
	}
}
